#include <stdio.h>

int main()
{
    int n = 0;
    int count = 0;
    int k[100] = {};

    printf("请输入一个正整数：");
    scanf("%d", &n);

    for (n; n > 0; count++)
    {
        k[count] = n % 2;
        n = n / 2;
    }

    count--;

    printf("该正整数的二进制为：");

    for (count; count >= 0; count--)
    {
        printf("%d", k[count]);
    }
    printf("\n");

    return 0;
}